aboutsummaryrefslogtreecommitdiff
path: root/src/routes/[player].ts
blob: 3f79368e18b7060a01a0df15e9fd91552126438f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import type { ParamMatcher, RequestHandler } from '@sveltejs/kit'

export const match: ParamMatcher = (param) => {
	return /^\w{2,16}$/.test(param)
}

export const get: RequestHandler = async ({ params }) => {
	return {
		status: 303,
		headers: {
			location: `/player/${params.player}`
		}
	}
}